<%@ page language="java" contentType="text/html; charset=utf8"	pageEncoding="utf8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@ include file="../../header.jsp" %>

<c:if test="${!empty typesList}">
	<table class="data">
		<c:forEach items="${typesList}" var="type">
			<tr>
				<td>${type.typeName}</td>
				<td><a href="dishType/delete/${type.id}"><spring:message code="label.delete" /></a></td>
				<td>edit</td>
			</tr>
		</c:forEach>
	</table>
</c:if>
 
	<form:form method="post" action="dishType" commandName="dishType">

		<table>
			<tr>
				<td><form:label path="typeName">
						<spring:message code="label.name" />
					</form:label>
				</td>
				<td><form:input path="typeName" /><form:errors path="typeName" />
				</td>
			</tr>
			
			<tr>
				<td colspan="2"><input type="submit"
					value="<spring:message code="label.add"/>" />
				</td>
			</tr>
		</table>
	</form:form>
 
<%@ include file="../../footer.jsp" %>